home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / monkeysphere.postinst < prev    next >
Encoding:
Text File  |  2011-03-24  |  955 b   |  45 lines

  1. #!/bin/sh
  2.  
  3. # postinst script for monkeysphere
  4.  
  5. # Author: Jameson Rollins <jrollins@finestructure.net>
  6. # Copyright 2008-2010
  7.  
  8. set -e
  9.  
  10. VARLIB="/var/lib/monkeysphere"
  11.  
  12. case $1 in
  13.     configure)
  14.     # add a monkeysphere user if one does not already exist
  15.     if ! getent passwd monkeysphere >/dev/null ; then
  16.         echo "adding monkeysphere user..."
  17.         adduser --quiet --system --no-create-home --group \
  18.         --home "$VARLIB" \
  19.         --shell '/bin/bash' \
  20.         --gecos 'monkeysphere authentication user,,,' \
  21.         monkeysphere
  22.     fi
  23.  
  24.     # try all available transitions:
  25.     for trans in 0.23 0.28 ; do
  26.         /usr/share/monkeysphere/transitions/$trans || { \
  27.         RET=$?
  28.         echo "Failed running transition script /usr/share/monkeysphere/transitions/$trans" >&2
  29.         exit $RET
  30.         }
  31.     done
  32.         
  33.  
  34.     # setup monkeysphere authentication
  35.     monkeysphere-authentication setup
  36.     ;;
  37. esac
  38.  
  39. # dh_installdeb will replace this with shell code automatically
  40. # generated by other debhelper scripts.
  41.  
  42.  
  43.  
  44. exit 0
  45.